package org.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.example.entity.Choose;

import java.util.List;

public interface ChooseMapper extends BaseMapper<Choose> {
    @Select("SELECT * FROM choose WHERE teacher_id = #{teacherId}")
    List<Choose> findByTeacherId(String teacherId);

    @Delete("delete from choose where student_id = #{id} and teacher_id = #{techerid}")
    boolean delStudent(int id, int teacherId);
}
